package com.pro.service.imple;

import com.pro.mapper.JsLogMapper;
import com.pro.pojo.JsDictData;
import com.pro.pojo.JsLog;
import com.pro.service.JsLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class JsLogServiceImple implements JsLogService {

    @Autowired
    private JsLogMapper jsLogMapper;


    /**
     * 操作日志的查看
     * @param id 模糊查id
     * @param name 模糊查name
     * @param time 模糊查time
     * @return
     */
    @Override
    public List<JsLog> getLogList(String id, String name, String time, Integer limit, Integer page) {
        return jsLogMapper.getLogList(id, name, time,limit,page);
    }

    /**
     * 操作日志的查看总数
     * @param id 模糊查id
     * @param name 模糊查name
     * @param time 模糊查time
     * @return
     */
    @Override
    public Integer getLogListCount(String id, String name, String time) {
        return jsLogMapper.getLogListCount(id, name, time);
    }

    /**
     * 通过id删除此数据
     * @param id
     * @return
     */
    @Override
    public Integer removeLogById(Integer id) {
        return jsLogMapper.removeLogById(id);
    }

    /**
     * 添加日志
     * @param data
     * @return
     */
    @Override
    public Integer addLog(JsDictData data) {
        return jsLogMapper.addLog(data);
    }
}
